﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="list-news.ascx.cs" Inherits="templates_admin_usercontrols_list_news" %>
<!---- Name : Phan Uy Linh -->
<!---- Email : uylinhqn@gmail.com -->
<!---- Phone : 01207963663 -->

<div class="box corners shadow">
    <div class="box-header">
        <h2>
            <img src="../templates/admin/images/edit-select-all.png" style="width:40px; height:40px; margin-top:-10px; position:absolute;" />
            <asp:Label ID="lbTitle" runat="server" Text="Danh sách bài viết" style="margin-left:40px"></asp:Label>
        </h2>
        <div class="box-header-ctrls">	
        	<a href="javascript:void(null);" title="" class="close"><!-- --></a>
        </div>
        <div class="box-header-ctrls" style="margin-right:10px;">	
        	<asp:Button ID="btnTiengViet" runat="server" Text="Việt" 
                CssClass="inbox-sf-add-btn tip" ToolTip="Xem bài viết Tiếng Việt" 
                onclick="btnTiengViet_Click" />        	
        </div>
         <div class="box-header-ctrls" style="margin-right:40px;">	
        	<asp:Button ID="btnTiengAnh" runat="server" Text="English" 
                 CssClass="inbox-sf-add-btn tip" ToolTip="Xem bài viết Tiếng Anh" 
                 onclick="btnTiengAnh_Click" />        	
        </div>
    </div>
    
    <div class="box-content" id="articles-2">
       <div class="inbox-sf">
           <asp:TextBox ID="txtTuKhoaVn"  CssClass="input-1" runat="server" onFocus="if(this.value=='Từ khóa...')this.value='';" onBlur="if(this.value=='')this.value='Từ khóa...';">Từ khóa...</asp:TextBox>
           <asp:TextBox Visible="false" ID="txtTuKhoaEn"  CssClass="input-1" runat="server" onFocus="if(this.value=='Keyword...')this.value='';" onBlur="if(this.value=='')this.value='Keyword...';">Keyword...</asp:TextBox>
 
             <asp:DropDownList ID="ddlChuyenMuc" runat="server" class="select-1" Width="250px">
                <asp:ListItem Value="0">------Tìm theo chuyên mục------</asp:ListItem>
            </asp:DropDownList>             
            <asp:Button ID="btnTim" runat="server" Text="Tìm" 
               CssClass="inbox-sf-search-btn" onclick="btnTim_Click" />
            
           <asp:Button ID="btnThem" runat="server" Text="Thêm" 
               CssClass="inbox-sf-add-btn tip" ToolTip="Thêm bài viết mới" 
               onclick="btnThem_Click" />           
                       
        </div>
        <ul class="articles-list-2">
               <!--tes-->
                  <table id="tablesorter-contact" style="width:100%">                   
                        <asp:Repeater ID="rptDanhSachTinTuc" runat="server" 
                            onitemcommand="rptDanhSachTinTuc_ItemCommand" >
                            <ItemTemplate> 
                                <li class="art" style="height:200px ;width : 98%">
                                    <div class="articles-left">
                    	                <h2><a href="#"><%#Eval("TieuDe")%></a></h2>
                                        <p>
                                            <a href="<%#"../uploads/image-news/" + Eval("HinhAnh")%>" title="<%#Eval("TieuDe")%>" class="pirobox_media3">
                                                <img src="<%#"../uploads/image-news/" + Eval("HinhAnh")%>" /> 
                                            </a>  
                                        </p>
                                        <div style="margin-left:180px; margin-top:-130px; float:left">
                                            <b><asp:Label ID="lbNoiDung" runat="server" Text="Nội dung : "></asp:Label></b></br>
                                            <%#Eval("NoiDung")%>
                                        </div>
                                    </div>
                                    <ul class="articles-right">
                                    <li><b><asp:Label ID="lbDanhMuc" runat="server" Text="Chuyên mục : "></asp:Label></b><%#Eval("TenDanhMuc")%></li>
                                    <li><b><asp:Label ID="lbNgayViet" runat="server" Text="Ngày viết : "></asp:Label></b><%#Eval("NgayDang")%></li>
                                    <li><b><asp:Label ID="lbNguoiDang" runat="server" Text="Viết bởi : "></asp:Label></b><%#Eval("NguoiDang")%></li>
                                    <li><b><asp:Label ID="lbLuotXem" runat="server" Text="Lượt xem : "></asp:Label></b><%#Eval("LuotXem")%></li>
                                    <li><b><asp:Label ID="lbTrangThai" runat="server" Text="Trạng thái : "></asp:Label></b> <%#(Boolean.Parse(Eval("TrangThai").ToString()) == true & Eval("NgonNgu").ToString()=="vn")?"Đã đăng":(Boolean.Parse(Eval("TrangThai").ToString()) == false & Eval("NgonNgu").ToString()=="vn")?"Chờ duyệt":(Boolean.Parse(Eval("TrangThai").ToString()) == true & Eval("NgonNgu").ToString()=="en")?"Posted":(Boolean.Parse(Eval("TrangThai").ToString()) == false & Eval("NgonNgu").ToString()=="en")?"Waiting for approval":""%></li>                                        
                                        <li class="articles-right-ctrls">
                                        <asp:LinkButton ID="hbTrangThai" runat="server" class="edit-contact gradient-btn" CommandArgument='<%# Eval("IdTinTuc")%>' CommandName="statusupdate">Trạng thái</asp:LinkButton>  
                                            <asp:HyperLink ID="hplSua" runat="server" class="edit-contact gradient-btn" 
                                                NavigateUrl='<%# "~/admin/AddNews.aspx?action=edit&Id=" + Eval("IdTinTuc") %>' >Sửa</asp:HyperLink>  
                                            <asp:LinkButton ID="lbXoa" runat="server" class="delete-contact gradient-btn" 
                                                CommandArgument='<%# Eval("IdTinTuc")%>' CommandName="xoa" 
                                                onclientclick="return confirm('Chắc chắn rằng bạn muốn xóa sản phẩm này?');" >Xóa</asp:LinkButton> 
                                      </li>
                                    </ul>
                                </li>
                            </ItemTemplate>
                            <FooterTemplate>
                                </tbody>
                            </FooterTemplate>
                        </asp:Repeater>                        
                    </table>
                </ul>
                <div id="msgSearch" runat="server" class="form-msg-warning-advanced" 
                    style="display:none; float:left; margin-left:0px; margin-bottom:20px; width:220px;">
                    Không có kết quả như yêu cầu tìm kiếm!</div>
                <div id="msgNoRows" runat="server" class="form-msg-warning-advanced" 
                    style="display:none; float:left; margin-left:0px; margin-bottom:20px; width:200px;">
                    Dữ liệu đang cập nhật...</div>
                <div class="box-bt-bar">
                    <ul id="PhanTrang" runat="server" class="box-nav" style="display:inline-table;">
                        <li>
                            <asp:LinkButton ID="lbtnFirst" runat="server" CausesValidation="false" 
                                CssClass="prev" onclick="lbtnFirst_Click" >Đầu</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton ID="lbtnPrevious" runat="server" CausesValidation="false" 
                                CssClass="prev" onclick="lbtnPrevious_Click">Trước</asp:LinkButton>
                        </li>
                        <li>
                            <asp:DataList ID="dlPaging" runat="server"  
                                 RepeatDirection="Horizontal" onitemcommand="dlPaging_ItemCommand" 
                                onitemdatabound="dlPaging_ItemDataBound">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkbtnPaging" runat="server" 
                                        CommandArgument='<%# Eval("PageIndex") %>' CommandName="Paging" CssClass="num" 
                                        Text='<%# Eval("PageText") %>'></asp:LinkButton>
                                </ItemTemplate>
                            </asp:DataList>
                        </li>
                        <li>
                            <asp:LinkButton ID="lbtnNext" runat="server" CausesValidation="false" 
                                CssClass="next" onclick="lbtnNext_Click" >Tiếp</asp:LinkButton>
                        </li>
                        <li>
                            <asp:LinkButton ID="lbtnLast" runat="server" CausesValidation="false" 
                                CssClass="next" onclick="lbtnLast_Click" >Cuối</asp:LinkButton>
                            <asp:Label ID="lblPageInfo" runat="server" Visible="false"></asp:Label>
                        </li>
                    </ul>
                </div>
      
        <div class="bulk-actions">           
            <asp:Button ID="btnLamMoi" runat="server" Text="Làm mới" 
                onclick="btnLamMoi_Click" />
        </div>                      
    </div><!-- END ".box-content" --> 
</div><!-- END ".box" -->

